﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Security
{
    public sealed class Md5
    {
        /// <summary>
		/// 标准Md5算法
		/// </summary>
		/// <param name="tempString">需要加密的字符串</param>
		/// <returns>加密后的字符串</returns>
		public static string GetMd5(string tempString)
        {
            System.Security.Cryptography.MD5CryptoServiceProvider HashMd5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
            return BitConverter.ToString(HashMd5.ComputeHash(Encoding.Default.GetBytes(tempString))).Replace("-", "").ToLower();
        }
    }
}
